package com.heima.apis.admin;

import com.heima.model.common.dtos.PageResponseResult;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.wemedia.dtos.NewsAuthDto;
import com.heima.model.wemedia.dtos.WmSensitiveDto;
import com.heima.model.wemedia.pojos.WmSensitive;
import com.heima.model.wemedia.pojos.WmUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "leadnews-wemedia")
public interface IAdminAuthNewsClient {
    /**
     * 获取所有文章列表
     * @param newsAuthDto
     * @return
     */
    @PostMapping("/api/v1/auth/list_vo")
    public ResponseResult listVo(@RequestBody NewsAuthDto newsAuthDto);

    /**
     * 获取文章详情
     * @param wmNewsId
     * @return
     */
    @GetMapping("/api/v1/auth/one_vo/{id}")
    public ResponseResult onrVo(@PathVariable("id") Integer wmNewsId);

    /**
     * 审核文章 不通过
     * @param newsAuthDto
     * @return
     */
    @PostMapping("/api/v1/auth/auth_fail")
    public ResponseResult authFail(@RequestBody NewsAuthDto newsAuthDto);

    /**
     * 审核文章 通过
     * @param newsAuthDto
     * @return
     */
    @PostMapping("/api/v1/auth/auth_pass")
    public ResponseResult authPass(@RequestBody NewsAuthDto newsAuthDto);

    @PostMapping("/api/v1/wmnews/creatUser")
    public ResponseResult creatUser(@RequestBody WmUser wmUser);


    @DeleteMapping("/api/v1/WmSensitive/del/{id}")
    public ResponseResult del(@PathVariable("id") Integer id);

    @PostMapping("/api/v1/WmSensitive/list")
    public PageResponseResult list(@RequestBody WmSensitiveDto wmSensitiveDto);

    @PostMapping("/api/v1/WmSensitive/save")
    public ResponseResult save(@RequestBody WmSensitive wmSensitive);

    @PostMapping("/api/v1/WmSensitive/update")
    public ResponseResult update(@RequestBody WmSensitive wmSensitive);
}
